<?php
$tpl['title'] = $film_info['name'][$user_agent['written_language_tag']].'（'.$language_pack['movie.doubanxia'].'）';
include($gDOCUMENT_ROOT_SYSTEM.'templates/'.$gTEMPLATE.'/html/section/head.tpl');
?>
<body>
<script type="text/javascript" src="<?php echo $gSYSTEM_URL;?>templates/<?php echo $gTEMPLATE;?>/javascript/font-size.js">
</script>
<?php
include($gDOCUMENT_ROOT_SYSTEM.'templates/'.$gTEMPLATE.'/html/section/top-nav.tpl');
?>
    <div id="wrapper">
	<?php
	include($gDOCUMENT_ROOT_SYSTEM.'templates/'.$gTEMPLATE.'/html/section/header.tpl');
	?>
    <h1><?php echo $film_info['name'][$user_agent['written_language_tag']];?></h1>
    <div id="content">
        <div class="grid-16-8 clearfix">
                <div class="article">
        <div class="indent"><div class="subjectwrap clearfix"><div class="subject clearfix">

         <div id="mainpic">
                </div><div id="info">
                <span>
                <?php
				if(!empty($film_info['director']))
				{
				?>
                <span class="pl"><?php echo $language_pack['director'];?></span>: <?php echo $film_info['director'];?>
                </span><br />
                <?php
                }
                ?>
                <?php
				if(!empty($film_info['screenwriter']))
				{
				?>
                <span class="pl"><?php echo $language_pack['screenwriter']?></span>: <?php echo $film_info['screenwriter'];?><br />
                <?php
                }
                ?>
                <?php
				if(!empty($film_info['cinematographer']))
				{
				?>
                <span class="pl"><?php echo $language_pack['cinematographer']?></span>: <?php echo $film_info['cinematographer'];?><br />
                <?php
                }
                ?>
                <?php
				if(!empty($film_info['cast']))
				{
				?>
                <span class="pl"><?php echo $language_pack['cast'];?></span>: <?php echo $film_info['cast'];?><br />
                <?php
                }
                ?>
                <div class="obmo">
		            <?php
					if(!empty($film_info['country_name']))
					{
					?>
                	<span class="pl"><?php echo $language_pack['copyright_country'];?>:</span> <?php echo $film_info['country_name'];?><br />
                	<?php
		            }
		            ?>
		            <?php
					if(!empty($film_info['copyright_began_time']))
					{
					?>
                	<span class="pl"><?php echo $language_pack['copyright_began_time'];?>:</span> <?php echo $film_info['copyright_began_time'];?><br />
                	<?php
		            }
		            ?>
                	<span class="pl"><?php echo $language_pack['film_name'];?>:</span> 
                	<br />
                	<?php
                	foreach($film_info['name'] as $tag => $name)
                	{
                		if(!empty($name))
                		{
							echo $language_pack['written_language_name'][$tag].'：'.$name.'<br />';
						}
                	}
                	;
                	?>
                </div>
                <div class="obmo">
                <?php
                if(!empty($film_info['imdb_url']))
                {
                	echo '<span class="pl">'.$language_pack['imdb_url'].': <a href="'.$film_info['imdb_url'].'" target="_blank">'.'tt'.$film_info['imdb_id'].'</a></span><br />'."\n";
                }
                ?>
                <?php
                if(!empty($film_info['douban_url']))
                {
                	echo '<span class="pl">'.$language_pack['douban_url'].': <a href="'.$film_info['douban_url'].'" target="_blank">'.$film_info['douban_id'].'</a></span><br />'."\n";
                }
                ?>
                </div>
            </div>
        </div>
</div></div>
<div id="collect_form_1291875"></div>
    <div class="related_info">
    <h2><?php echo $language_pack['release_info'];?></h2>
    <h3><?php echo $language_pack['cinema'];?></h3>
    <h3><?php echo $language_pack['film_festival'];?></h3>
    <h3><?php echo $language_pack['dvd'];?></h3>
    <fieldset>
    <legend><?php echo $language_pack['dvd'];?></legend>
    <a href="./release_edit_dvd"><?php echo $language_pack['add_dvd_disk'];?></a>
    <table class="release">
    	<tr>
    		<th><?php echo $language_pack['release_date'];?></th>
    		<th><?php echo $language_pack['dvd_area'];?></th>
    		<th><?php echo $language_pack['resolution'];?></th>
    		<th><?php echo $language_pack['runtime'];?></th>
    		<th><?php echo $language_pack['video_bitrate'];?></th>
    		<th><?php echo $language_pack['option'];?></th>
    	</tr>
    	<?php
    	if(!empty($release_on_dvd))
    	{
			foreach($release_on_dvd as $value)
			{
				echo '<tr>';
				echo '<td>'.$value['date'].'</td>';
				echo '<td>'.$language_pack['dvd_area_array'][$value['area']].'</td>';
				echo '<td>'.$value['resolution_width'].'x'.$value['resolution_height'].'</td>';
				$a = addon::secondToHourArray($value['runtime']);
				echo '<td>'.$a['hour'].$language_pack['hour'].$a['minute'].$language_pack['minute'].$a['second'].$language_pack['second'].'</td>';

				echo '<td>'.$value['video_bitrate'].'Kbps</td>';
				echo '<td><a href="./resource_edit_dvd?source_id='.$value['id'].'">'.$language_pack['add_ed2k'].'</a></td>';
				echo '</tr>';
			}
		}
		?>
    </table>
    <?php
    if(!empty($download_info))
    {
    	foreach($download_info as $value)
    	{
			if($value['source_type']==$source_type['dvd'])
			{
				echo '<fieldset>';
				$a = addon::secondToHourArray($value['runtime']);
				echo '<legend>'.$language_pack['dvd_area_array'][$release_on_dvd[$value['source_id']]['area']].' '.$language_pack['compress_type_array'][$value['compress_type']].' '.$language_pack['resolution_type_array'][$value['resolution_type']].' '.$a['hour'].$language_pack['hour'].$a['minute'].$language_pack['minute'].$a['second'].$language_pack['second'].'</legend>';
				echo '<table>'."\n";
					echo '<tr>'."\n";
						echo '<th class="ed2k">ed2k</th>'."\n";
						echo '<th class="resolution">'.$language_pack['resolution'].'</th>'."\n";
						echo '<th class="video_bitrate">'.$language_pack['video_bitrate'].'</th>'."\n";
						echo '<th class="audio_language">'.$language_pack['audio_language'].'</th>'."\n";
						echo '<th class="subtitle_language">'.$language_pack['subtitle_language'].'</th>'."\n";
						echo '<th class="size">'.$language_pack['size'].'</th>';
					echo '</tr>'."\n";
					echo '<tr>'."\n";
						echo '<td>'."\n";
						$file_url_ed2k_array = explode(" ",$value['file_url_ed2k']);
						foreach($file_url_ed2k_array as $one_ed2k)
						{
							echo '<a href="'.$one_ed2k.'">ed2k</a>'."<br />\n";
						}
						echo '</td>'."\n";
						echo '<td>'.$value['resolution_width'].'x'.$value['resolution_height'].'</td>'."\n";
						echo '<td>'.$value['video_bitrate'].'Kbps</td>';
						echo '<td>'.implode("<br />",$value['audio_language']).'</td>'."\n";
						echo '<td>'.implode("<br />",$value['video_language']).'</td>'."\n";
						echo '<td>'."\n";
						$size_array = addon::getIecSizeByEd2k($file_url_ed2k_array);
						echo implode("<br />",$size_array).'</td>'."\n";
					echo '</tr>'."\n";
				echo '</table>'."\n";
				if(!empty($value['promulgator_name']))
				{
					echo $language_pack['contributors'].'：';
					if(!empty($value['ripper_url']))
					{
						echo '<a target="_blank" href="'.$value['ripper_url'].'">'.$value['ripper_name'].'</a>'." \n";
					}
					else
					{
						echo $value['ripper_name']." \n";
					}
					if(!empty($value['promulgator_url']))
					{
						echo '<a target="_blank" href="'.$value['promulgator_url'].'">'.$value['promulgator_name'].'</a>'." \n";
					}
					else
					{
						echo $value['promulgator_name']." \n";
					}
				}
				echo '</fieldset>'."\n";
			}
		}
	}
    ?>
    </fieldset>
    <h3><?php echo $language_pack['blu_ray'];?></h3>
    
    <fieldset>
    <legend><?php echo $language_pack['blu_ray'];?></legend>
    <a href="./release_edit_blu-ray"><?php echo $language_pack['add_blu_ray_disk'];?></a>
    <table class="release">
    	<tr>
    		<th><?php echo $language_pack['release_date'];?></th>
    		<th><?php echo $language_pack['blu_ray_area'];?></th>
    		<th><?php echo $language_pack['resolution'];?></th>
    		<th><?php echo $language_pack['runtime'];?></th>
    		<th><?php echo $language_pack['video_bitrate'];?></th>
    		<th><?php echo $language_pack['option'];?></th>
    	</tr>
    	<?php
    	if(!empty($release_on_blu_ray))
    	{
    		foreach($release_on_blu_ray as $value)
			{
				echo '<tr>'."\n";
				echo '<td>'.$value['date'].'</td>'."\n";
				echo '<td>'.$language_pack['blu_ray_area_array'][$value['area']].'</td>'."\n";
				echo '<td>'.$value['resolution_width'].'x'.$value['resolution_height'].'</td>'."\n";
				$a = addon::secondToHourArray($value['runtime']);
				echo '<td>'.$a['hour'].$language_pack['hour'].$a['minute'].$language_pack['minute'].$a['second'].$language_pack['second'].'</td>'."\n";
				echo '<td>'.$value['video_bitrate'].'Kbps</td>'."\n";
				echo '<td><a href="./resource_edit_blu-ray?source_id='.$value['id'].'">'. $language_pack['add_ed2k'].'</a></td>'."\n";
				echo '</tr>'."\n";
			}
		}
		?>
    </table>
    <?php
    if(!empty($download_info))
    {
    	foreach($download_info as $value)
    	{
			if($value['source_type']==$source_type['blu_ray'])
			{
				echo '<fieldset>';
				$a = addon::secondToHourArray($value['runtime']);
				echo '<legend>'.$language_pack['blu_ray_area_array'][$release_on_blu_ray[$value['source_id']]['area']].' '.$language_pack['compress_type_array'][$value['compress_type']].' '.$language_pack['resolution_type_array'][$value['resolution_type']].' '.$a['hour'].$language_pack['hour'].$a['minute'].$language_pack['minute'].$a['second'].$language_pack['second'].'</legend>';
				echo '<table>'."\n";
					echo '<tr>'."\n";
						echo '<th class="ed2k">ed2k</th>'."\n";
						echo '<th class="resolution">'.$language_pack['resolution'].'</th>'."\n";
						echo '<th class="video_bitrate">'.$language_pack['video_bitrate'].'</th>'."\n";
						echo '<th class="audio_language">'.$language_pack['audio_language'].'</th>'."\n";
						echo '<th class="subtitle_language">'.$language_pack['subtitle_language'].'</th>'."\n";
						echo '<th class="size">'.$language_pack['size'].'</th>'."\n";
					echo '</tr>'."\n";
					echo '<tr>'."\n";
						echo '<td>'."\n";
						$file_url_ed2k_array = explode(" ",$value['file_url_ed2k']);
						foreach($file_url_ed2k_array as $one_ed2k)
						{
							echo '<a href="'.$one_ed2k.'">ed2k</a>',"<br />"."\n";
						}
						echo '</td>'."\n";
						echo '<td>'.$value['resolution_width'].'x'.$value['resolution_height'].'</td>'."\n";
						echo '<td>'.$value['video_bitrate'].'Kbps</td>'."\n";
						echo '<td>'.implode("<br />",$value['audio_language']).'</td>'."\n";
						echo '<td>'.implode("<br />",$value['video_language']).'</td>'."\n";
						echo '<td>';
						$size_array = addon::getIecSizeByEd2k($file_url_ed2k_array);
						echo implode("<br />",$size_array).'</td>'."\n";
					echo '</tr>'."\n";
				echo '</table>'."\n";
				if(!empty($value['promulgator_name']))
				{
					echo $language_pack['contributors'].'：';
					if(!empty($value['ripper_url']))
					{
						echo '<a target="_blank" href="'.$value['ripper_url'].'">'.$value['ripper_name'].'</a>'." \n";
					}
					else
					{
						echo $value['ripper_name']." \n";
					}
					if(!empty($value['promulgator_url']))
					{
						echo '<a target="_blank" href="'.$value['promulgator_url'].'">'.$value['promulgator_name'].'</a>'." \n";
					}
					else
					{
						echo $value['promulgator_name']." \n";
					}
				}
				echo '</fieldset>'."\n";
			}
		}
	}
    ?>
    </fieldset>
			</div>
			</div>
			<div class="aside">
<!-- Include the Google Friend Connect javascript library. -->
<script type="text/javascript" src="http://www.google.com/friendconnect/script/friendconnect.js"></script>
<!-- Define the div tag where the gadget will be inserted. -->
<div id="div-1564450958608150127" style="border:1px solid #cccccc;"></div>
<!-- Render the gadget into a div. -->
<script type="text/javascript">
var skin = {};
skin['BORDER_COLOR'] = '#cccccc';
skin['ENDCAP_BG_COLOR'] = '#e0ecff';
skin['ENDCAP_TEXT_COLOR'] = '#333333';
skin['ENDCAP_LINK_COLOR'] = '#0000cc';
skin['ALTERNATE_BG_COLOR'] = '#ffffff';
skin['CONTENT_BG_COLOR'] = '#ffffff';
skin['CONTENT_LINK_COLOR'] = '#0000cc';
skin['CONTENT_TEXT_COLOR'] = '#333333';
skin['CONTENT_SECONDARY_LINK_COLOR'] = '#7777cc';
skin['CONTENT_SECONDARY_TEXT_COLOR'] = '#666666';
skin['CONTENT_HEADLINE_COLOR'] = '#333333';
skin['NUMBER_ROWS'] = '14';
google.friendconnect.container.setParentUrl('/' /* location of rpc_relay.html and canvas.html */);
google.friendconnect.container.renderMembersGadget(
 { id: 'div-1564450958608150127',
   site: '13496013090209736255' },
  skin);
</script>
		
		</div> 
    </div>
    <?php
		include($gDOCUMENT_ROOT_SYSTEM.'templates/'.$gTEMPLATE.'/html/section/footer.tpl');
		?>
    </div> 
</div>
</body>
</html>
